<?php

class BolaoSubcategory extends BaseBolaoSubcategory
{
  public function getCategory()
  {
    $criteria = new Criteria();
    $criteria->add(BolaoCategoryPeer::ID, $this->getCategoryId(), Criteria::EQUAL);
    return BolaoCategoryPeer::doSelectOne($criteria);
  }

  public function __toString()
  {
    return $this->getCategory().' - '.$this->getName();
  }

  public function getNameSlug()
  {
    return Bolao::slugify($this->getName());
  }
}
